<template>
  <ul class="Goodslist">
    <li
      v-for="(item, index) in Goodslist"
      :key="index"
      @click="goDetail(item.goodsid)"
    >
      <!-- @click="goDetail(item.id) -->
      <img :src="item.img" />
      <p>{{ item.msg }}</p>
      <h3>￥{{ item.pirce }} <h4>1000+已付款</h4></h3>
    </li>
  <!-- <van-rate v-model="value" /> -->
  </ul>
</template>

<script>
import mouth from '../../public/utils/mouth'
export default {
  props: ["goodsid"],
  data() {
    return {
      Goodslist: [
      {
        "img": "/imgs/1.gif",
        "msg": "走过路过不错过",
        "pirce": 899,
        "goodsid": "001",
        "type": "潮款爆鞋",
        "oldpirce" : 666,
        "name" : "Nike跑鞋",
        "kind" : "0"
      },
      {
        "img": "/imgs/2.gif",
        "msg": "走过路过不错过",
        "pirce": 899,
        "goodsid": "002",
        "type": "人气潮服",
        "oldpirce" : 666,
        "name" : "Nike跑鞋",
        "kind" : "0"
      },
      {
        "img": "/imgs/3.gif",
        "msg": "走过路过不错过走过路过不错过走过路过不错过走过路过不错过走过路过不错过",
        "pirce": 899,
        "goodsid": "003",
        "type": "潮款爆鞋",
        "oldpirce" : 666,
        "name" : "Nike跑鞋",
        "kind" : "0"
      },
      {
        "img": "/imgs/4.gif",
        "msg": "走过路过不错过",
        "pirce": 899,
        "goodsid": "004",
        "type": "潮款爆鞋",
        "oldpirce" : 666,
        "name" : "Nike跑鞋",
        "kind" : "0"
      },
      {
        "img": "/imgs/5.gif",
        "msg": "走过路过不错过",
        "pirce": 899,
        "goodsid": "005",
        "type": "潮款爆鞋",
        "oldpirce" : 666,
        "name" : "Nike跑鞋",
        "kind" : "0"
      },
      {
        "img": "/imgs/6.gif",
        "msg": "走过路过不错过",
        "pirce": 899,
        "goodsid": "006",
        "type": "人气潮服",
        "oldpirce" : 666,
        "name" : "Nike跑鞋",
        "kind" : "1"
      }
    ],
    };
  },
  methods: {
  //   goDetail(id) {
  //     this.$router.push("/DetailAll?id=" + id);
  //   },
  //   listGoods(){
  //      mouth.get("/comments",{
  //   })
  //   .then(res=>{
  //     this.Goodslist = res.data;
  //   })
  //   .catch(err=>{
  //     console.log("出错了",err);
  //   })
  // },
      //商品列表
    // listGoods() {
    //      mouth.get("/goods/all")
    //     .then((res) => {
    //       // this.shopList = res.data;
    //       console.log(res.data);
    //     })
    //     .catch((err) => {
    //       console.log("出错了", err);
    //     });
    // },
    },
    // created(){
    //    this.listGoods()
    //  },
    }
  
  

</script>

<style scoped>
.Goodslist {
  /* width: 100%; */
  display: flex;
  flex-wrap: wrap;
   box-sizing: border-box;
}   
.Goodslist li {
  width: 50%;
  box-sizing: border-box;
  padding: 0 0.14rem 0.2rem 0.12rem;
  height: 2.35rem;
}
.Goodslist li img {
  height: 1.2rem;
  margin: auto;
  display: block;
}
.Goodslist li h3 {
  font-size: 00.16rem;
  margin-top: 00.08rem;
  display: flex;
  justify-content: space-between;
}
.Goodslist li h3 h4{
  font-weight: normal;
  color: gray;
  font-size: 0.14rem;
}
.Goodslist li p {
  height: 0.36rem;
  margin-top: 00.1rem;
  line-height: 0.18rem;
  font-size: 0.14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
</style>